#ifndef __PHASE__H__
#define __PHASE__H__
#define PHASE_A  P21
#define PHASE_B  P17
#define PHASE_C  P25
#define PHASE_D  P25
extern void phase_check_time(void);
extern void phase_check(void);

typedef struct{
	uint16_t is_MissPhaseA_protect  : 1; //bit0
	uint16_t is_MissPhaseB_protect  : 1; //bit1
	uint16_t is_MissPhaseC_protect  : 1; //bit2
	uint16_t is_MissPhaseD_protect  : 1; //bit3
}phase_status_t;

extern phase_status_t  phase_status;

#define _set_MissPhaseA_protect()         (phase_status.is_MissPhaseA_protect =  1u)
#define _clr_MissPhaseA_protect()         (phase_status.is_MissPhaseA_protect =  0u)

#define _set_MissPhaseB_protect()         (phase_status.is_MissPhaseB_protect =  1u)
#define _clr_MissPhaseB_protect()         (phase_status.is_MissPhaseB_protect =  0u)

#define _set_MissPhaseC_protect()         (phase_status.is_MissPhaseC_protect =  1u)
#define _clr_MissPhaseC_protect()         (phase_status.is_MissPhaseC_protect =  0u)

#define _set_MissPhaseD_protect()         (phase_status.is_MissPhaseD_protect =  1u)
#define _clr_MissPhaseD_protect()         (phase_status.is_MissPhaseD_protect =  0u)

#endif /* __PHASE_FUNC_H__ */